import com.kuang.dao.BlogMapper;
import com.kuang.dao.TeacherMapper;
import com.kuang.dao.UserDao;
import com.kuang.pojo.Blog;
import com.kuang.pojo.Teacher;
import com.kuang.pojo.User;
import com.kuang.until.MybatisUntils;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Mytest {
    @Test
            public void test(){
        SqlSession sqlSession= MybatisUntils.getSqlSession();
        BlogMapper mapper = sqlSession.getMapper(BlogMapper.class);
        HashMap<String, Object> map = new HashMap<String, Object>();

        map.put("author","hao");
        List<Blog> i = mapper.queryBlogIf(map);
        System.out.println(i);
        System.out.println("==============");
        sqlSession.clearCache();
        map.put("author","hao");
        List<Blog> blogs = mapper.queryBlogIf(map);
        System.out.println(blogs);


        sqlSession.close();
    }






}
